package Cantella::DJabberd::Model::Admin::RosterItem::Action::Update;

use Reaction::Class;

#use Reaction::Types::Core qw( NonEmptySimpleStr );
use aliased 'Reaction::InterfaceModel::Action::DBIC::Result::Update' => 'DBIC_Update';

class Update is DBIC_Update, which {

#  has name => (is => 'rw', isa => NonEmptySimpleStr, lazy_fail => 1);
  has roster_groups => (
                       is  => 'rw',
                       isa => 'ArrayRef',
                       valid_values => sub {
                         shift->target_model->result_source
                           ->related_source('roster_group_items')
                             ->relates_source('roster_group')->resultset;
                       }
                      );

  #make this default to mutual or whatever
 # has subscription => (is  => 'rw', isa => 'Int', lazy_fail => 1);

};

1;
